﻿using UnityEngine;
using System.Collections;

public class MoveLevel : MonoBehaviour
{

    public GameObject GDPRDialog;

    // Use this for initialization
    void Start()
    {

        if (PlayerPrefs.GetInt("gdprok") == 0)
        {
            if (GDPRDialog != null)
                GDPRDialog.SetActive(true);
        }
        else
        {
            //GoogleAdsManager.Instance.RequestBanner();

            if (GDPRDialog != null)
                GDPRDialog.SetActive(false);

        }

    }

    public void GDPROk()
    {
        if (GDPRDialog != null)
            GDPRDialog.SetActive(false);
        PlayerPrefs.SetInt("gdprok", 1);

        //GoogleAdsManager.Instance.RequestBanner();
    }

    // Update is called once per frame
    void Update()
    {



        if (!CharacterController.isStuck && transform.position.x > -13)
        {
            transform.Translate(-0.0035f, 0f, 0f);
        }
    }
}
